<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="com.pmsco.pms.core.constant.PmsConstant"%>
<%@ page import="com.pmsco.pms.util.BundleUtil"%>
<%@ include file="/WEB-INF/import/tagLibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script>
	    $(function() {
	    	var h = $("#adminMainTable").height() - 30;
	        $("#tabs").tabs();
	        $("#tabs").css('height', h);
	        $("button").button();
	    });
    </script>
</head>
<body class="pmsMainBody">
	<table class="pmsMainTable">
		<tr class="pmsMainTableWrapperTd">
			<td class="pmsFullTableTd">
			    <table class="tableForm pmsFullTable" cellpadding="0" cellspacing="0" id="adminMainTable">
			    	<tr>
			    		<td height="100%">
			    			<div id="tabs">
			    				<input type="hidden" id="id" name="id" value="${command.id}"/>
							    <ul>
							        <li><a href="#tabs-1">Session</a></li>
							        <li><a href="#tabs-2">System Configuration</a></li>
							        <li><a href="#tabs-3">Log Configuration</a></li>
							    </ul>
							    <div id="tabs-1" style="height: 100%">
							        <p>Session Information</p>
							    </div>
							    <div id="tabs-2">
							    	<table class="tableForm" width="60%" align="left">
							    		<tr>
											<td class="tableFormLabel"><label class="tableFormLabelRequired">*&nbsp;</label><spring:message code="system.emailUser"/></td>
											<td><input type="email" class="talbeFormTextBox" id="sysEmailUser" name="sysEmailUser" value="${command.sysEmailUser}" size="50" required/></td>
										</tr>
										<tr>
											<td class="tableFormLabel"><label class="tableFormLabelRequired">*&nbsp;</label><spring:message code="system.emailPassword"/></td>
											<td><input type="password" class="talbeFormTextBox" id="sysEmailPassword" name="sysEmailPassword" value="${command.sysEmailPassword}" size="25" required/></td>
										</tr>
										<tr>
											<td class="tableFormLabel"><spring:message code="system.emailAuth"/></td>
											<td><input type="checkbox" class="talbeFormTextBox" id="sysEmailAuth" <c:if test = "${command.sysEmailAuth == 'T'}"> checked="checked" </c:if> name="sysEmailAuth" value="${command.sysEmailAuth}"/></td>
										</tr>
										<tr>
											<td class="tableFormLabel"><spring:message code="system.emailTtlEnable"/></td>
											<td><input type="checkbox" class="talbeFormTextBox" id="sysEmailTlsEnable" <c:if test = "${command.sysEmailTlsEnable == 'T'}"> checked="checked" </c:if> name="sysEmailTlsEnable" value="${command.sysEmailTlsEnable}"/></td>
										</tr>
										<tr>
											<td class="tableFormLabel"><label class="tableFormLabelRequired">*&nbsp;</label><spring:message code="system.emailHost"/></td>
											<td><input type="text" class="talbeFormTextBox" id="sysEmailHost" name="sysEmailHost" value="${command.sysEmailHost}" size="50" required/></td>
										</tr>
										<tr>
											<td class="tableFormLabel"><label class="tableFormLabelRequired">*&nbsp;</label><spring:message code="system.emailPort"/></td>
											<td><input type="text" class="talbeFormTextBox" id="sysEmailPort" name="sysEmailPort" value="${command.sysEmailPort}" size="5" required/></td>
										</tr>
										<tr>
											<td class="tableFormLabel"><spring:message code="system.encodeType"/></td>
											<td>
												<select id="sysEncodeType" name="sysEncodeType">
													<option value="1" ${1 == command.sysEncodeType ? "selected" : ""}>Base 64</option>
												</select>
											</td>
										</tr>
							    	</table>
							    </div>
							    <div id="tabs-3">
							    	<table class="tableForm" width="60%" align="left">
							    		<tr>
											<td class="tableFormLabel"><label class="tableFormLabelRequired">*&nbsp;</label><spring:message code="system.logLevel"/></td>
											<td>
												<select id="sysLogLevel" name="sysLogLevel">
													<option value="ALL" ${"ALL" == command.sysLogLevel ? "selected" : ""}>ALL</option>
													<option value="INFO" ${"INFO" == command.sysLogLevel ? "selected" : ""}>INFO</option>
													<option value="DEBUG" ${"DEBUG" == command.sysLogLevel ? "selected" : ""}>DEBUG</option>
												</select>
											</td>
										</tr>
							    	</table>
							    </div>
							</div>
			    		</td>
			    	</tr>	
			    	<tr>
						<td>
							<table align="center">
								<tr>
									<td>
										<button class="tableFormButton" onclick="return submitAction('<%=PmsConstant.savePmsSysConfiguration_JspUrl%>', true)"><spring:message code="button.save"/></button>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>